package cate.common.table.d;

import cate.common.table.common.ParamSheet;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

public final class GDHeroCall {

  @NoteField(value = "万分比基数")
  public static final double WEIGHT_BASE = 10000.0;

  @NoteField(value = "连抽默认次数")
  public static final int CALL_TEN_TIMES = 10;

  @NoteField(value = "测试模式")
  public static boolean test = false;

  public static int ADVENTURE_CALL_SCORE;

  public static int NATURE_CALL_SCORE;

  public static int HERO_UP_CALL_SCORE;

  public static int LIMIT_HERO_UP_CALL_SCORE;

  @NoteClass(value = "食灵召唤-召唤类型")
  public static class Mode {
    @NoteField(value = "默认召唤模式", detail = "不具备任何特殊逻辑的抽取模式目前除了高级，上新")
    public static final int DEFAULT_CALL_MODE = 0;

    @NoteField(value = "高级召唤")
    public static final byte ADVANCE = 1;

    @NoteField(value = "友情召唤")
    public static final byte FRIEND = 2;

    @NoteField(value = "普通召唤")
    public static final byte NORMAL = 3;

    @NoteField(value = "积分召唤")
    public static final byte SCORE = 4;

    @NoteField(value = "食神召唤")
    public static final byte NATURE = 5;

    @NoteField(value = "英雄上新")
    public static final byte UPDATE = 6;

    @NoteField(value = "限定英雄")
    public static final byte RESTRICT_CALL = 7;

    @NoteField(value = "精英召唤（点将台）")
    public static final byte CREAM = 100;

    @NoteField(value = "神魔共生")
    public static final byte GOD_EVIL = 101;

    @NoteField(value = "默认副本类型")
    public static final byte DEFAULT = NORMAL;


    @NoteField(value = "食神召唤之积分兑换")
    public static final int NATURE_POINTS_EXCHANGE_START = 261;
    @NoteField(value = "食神召唤之积分兑换")
    public static final int NATURE_POINTS_EXCHANGE_END = 266;
    //召唤屋子类型
    @NoteField(value = "食神召唤之置换")
    public static final int NATURE_SUB_EXCHANGE = 270;
    @NoteField(value = "食神召唤之许愿")
    public static final int NATURE_SUB_BASE = 200;
    @NoteField(value = "食神召唤之积分兑换")
    public static final int NATURE_SUB_POINT = 260;


    public static byte[] all() {
      return new byte[]{ADVANCE, FRIEND, NORMAL, SCORE, NATURE, UPDATE, RESTRICT_CALL};
    }

    public static String getDesc(byte mode) {
      switch (mode) {
        case ADVANCE:
          return "高级召唤";
        case FRIEND:
          return "友情召唤";
        case UPDATE:
          return "英雄上新";
        case NATURE:
          return "食神召唤";
        case NORMAL:
          return "普通召唤";
        case SCORE:
          return "积分召唤";
        case RESTRICT_CALL:
          return "限定召唤";
        default:
          return "召唤";
      }
    }
  }

  public static class Star {
    public static int Five = 5;
    public static int Four = 4;
  }

  public static class CallPriority {
    @NoteField(value = "n连抽保底进入指定五星池组")
    public static final int ENSURE_FIVE_HERO_POOL = 1;
    @NoteField(value = "第几抽进入指定组")
    public static final int FORCE_APPOINT_POOL_RECALL = 2;
    @NoteField(value = "限制五星个数")
    public static final int LIMIT_STAR_FIVE_HERO_NUM = 1;
    @NoteField(value = "全三星保一个四星", detail = "在最终结果处执行")
    public static int ENSURE_ONE_FOUR_STAR_HERO = 1;
  }

  @NoteField(value = "许愿屋许愿次数当日上限")
  public static int NATURE_BASE_CALL_DAY_TIME_LIMIT;


  public static void initialize(ParamSheet paramSheet) {
    ADVENTURE_CALL_SCORE = GDParamTool.getInt(paramSheet, 130001, 1);
    NATURE_CALL_SCORE = GDParamTool.getInt(paramSheet, 130002, 5);
    HERO_UP_CALL_SCORE = GDParamTool.getInt(paramSheet, 130004, 2);
    LIMIT_HERO_UP_CALL_SCORE = GDParamTool.getInt(paramSheet, 130006, 4);
    NATURE_BASE_CALL_DAY_TIME_LIMIT = GDParamTool.getInt(paramSheet, 200501, 1000);
  }

}
